var Storage = {
    // ==================sessionsTorage设置缓存================
    // 设置缓存
    localSet: function (name, data) {
		try{
			uni.setStorageSync(name,JSON.stringify(data))
		}catch(e){
			//TODO handle the exception
			console.info(e)
		}
    },
    // 获取缓存
    localGet: function (name) {
		try{
			let token =uni.getStorageSync(name);
			return JSON.parse(token);
		}catch(e){
			//TODO handle the exception
			// console.info(e)
		}
    },
    // 清除缓存
    localRemove: function (name) {
        uni.removeStorage({
        	key:name,
			success() {
				console.info('缓存清理成功')
			}
        }) 
    },
	// 清除缓存
	localRemoveAll: function (name) {
		uni.clearStorageSync();	
	  //   uni.removeStorage({
	  //   	key:name,
			// success() {
			// 	console.info('缓存清理成功')
			// }
	  //   }) 
	},
 
}
 
export default Storage